package com.tchhy.mvplibrary.ui.dialog

import android.os.Bundle
import com.tchhy.mvplibrary.presenter.BasePresenter
import com.tchhy.mvplibrary.presenter.view.BaseView
import com.tchhy.provider.rx.BaseException
import com.trello.rxlifecycle2.components.support.RxDialogFragment

abstract class BaseMvpDialogFragment<T : BasePresenter<*>> : RxDialogFragment(), BaseView {

    lateinit var mPresenter: T

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        initPresenter()
    }

    abstract fun initPresenter()

    override fun showLoading() {
    }

    override fun dismissLoading() {
    }

    override fun onError(throwable: BaseException) {
    }

}